package com.frogs.ucenter.v1.request;

import javax.servlet.http.HttpServletRequest;

import com.frogs.framework.web.HttpRequestInfo;
import com.frogs.system.util.ApiUrlParamEnum;
import com.frogs.system.web.api.request.Request;
import com.frogs.system.web.exception.RequestIllegalException;

public class UserLevelInfoQueryRequest extends Request {
	
	private int id;
	
	public UserLevelInfoQueryRequest() {
	}
	
	@Override
	public void parse(HttpServletRequest request) {
		HttpRequestInfo requestInfo = new HttpRequestInfo(request);
		this.id = requestInfo.getIntParameter(ApiUrlParamEnum.userId.getParamName(), 0);
		
		if(id == 0) {
			throw new RequestIllegalException("缺少用户id，请确认!");
		}
	}
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

}
